.container {
	height: 100%;
	display: flex;
	flex-direction: row;
	background: var(--bg-overflow);
}

.sidebar {
	background: var(--bg-floating);
	height: 100%;
	width: 260px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	justify-content: space-between;
}

.spriteButtons {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 6px;
}

.spriteButton {
	display: block;
	background: var(--bg-surface);
	background-repeat: repeat;
	background-size: 50%;
	border: none;
	aspect-ratio: 1;
	padding: 0;
	overflow: hidden;
	cursor: var(--cursor-interactive);
}

.spriteButton.active {
	box-shadow: 0 0 0 2px var(--bg-overlay), 0 0 0 3px var(--fg-switch-high);
}

.helpText {
	font-size: 0.9em;
	color: var(--fg-muted);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.helpText p {
	margin: 0;
}

.resizeX, .resizeY {
	flex: 1;
	display: flex;
	padding: 10px;
	overflow: hidden;
    align-items: center;
}
.resizeX {
	flex-direction: row;
	width: 100%;
}
.resizeY {
	flex-direction: column;
	height: 100%;
}

.resizeControls {
	display: flex;
	flex-direction: row;
	gap: 4px;
}

.resizeControls button {
	cursor: var(--cursor-interactive);
    background: none;
    color: inherit;
    font-family: inherit;
    font-size: 2em;
    padding: 0;
    border: none;
	line-height: 0.7;
	user-select: none;
}

.resizeControls button:not(:disabled):hover {
	color: var(--accent);
}

.resizeControls button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.gridContainer {
	flex: 1;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 10px;
}

.grid {
	display: flex;
	flex-direction: column;
	background-repeat: repeat;
	background-size: calc(var(--cell-size) / 4);
}

.grid .row {
	display: flex;
	flex-direction: row;
}

.cell {
	width: var(--cell-size);
	height: var(--cell-size);
	border: 1px solid var(--bg-overflow);
}

.cell.error {
	background: var(--error);
}

.cell:hover {
	box-shadow:
		0 0 0 var(--cell-size) inset var(--bg-drawing-hover),
		0 0 0 3px inset var(--accent);
	z-index: 1;
}

.container :global(canvas) {
	width: 100%;
	height: 100%;
}